10 CLS:PRINT "Coord Transformation Program:":CLS:SET N
20 PRINT "Old x1:";ox1;:INPUT ox1:PRINT "Old y1:";oy1;:INPUT oy1:CLS
30 PRINT "Old x2:";ox2;:INPUT ox2:PRINT "Old y2:";oy2;:INPUT oy2:CLS
40 PRINT "New x1:";nx1;:INPUT nx1:PRINT "New y1:";ny1;:INPUT ny1:CLS
50 PRINT "New x2:";nx2;:INPUT nx2:PRINT "New y2:";ny2;:INPUT ny2:CLS
60 Z=POL((ox2-ox1),(oy2-oy1)):brgold=90-Y:baseold=Z
70 Z=POL((nx2-nx1),(ny2-ny1)):brgnew=90-Y:basenew=Z
80 SF=basenew/baseold:mm=ABS(1000000-(SF*1000000))
90 BEEP 0:PRINT "Old:";ROUND(baseold,-5);TAB(16);"New:";ROUND(basenew,-5);TAB(32);"SF:";ROUND(SF,-7);TAB(45);ROUND(mm,-2);"per Km":CLS
100 deltabrg=brgold-brgnew
110 B=SF*COS(deltabrg):YY=SF*SIN(deltabrg)
120 E0=nx1-(ox1*B)+(oy1*YY):N0=ny1-(ox1*YY)-(oy1*B)
130 PRINT "Old x3:";ox3;:INPUT ox3:PRINT "Old y3:";oy3;:INPUT oy3:CLS
140 nx3=E0+(ox3*B)-(oy3*YY):ny3=N0+(ox3*YY)+(oy3*B)
150 Z=POL((nx1-nx3),(ny1-ny3)):brg31=90-Y:IF brg31<0 THEN brg31=brg31+360
160 Z=POL((nx2-nx3),(ny2-ny3)):brg32=90-Y:IF brg32<0 THEN brg32=brg32+360
170 BEEP 0:PRINT "New x3:";ROUND(nx3,-5);TAB(32);"New y3:";ROUND(ny3,-5):CLS
180 BEEP 0:PRINT "Brg to 1:";DMS$(brg31);TAB(32);"Brg to 2:";DMS$(brg32):CLS:GOTO 130
